#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

LANGUAGE_CODE = 'zh-hans'

SMS = 666

# 腾讯云短信应用的 app_id
TENCENT_SMS_APP_ID = 1400329167

# 腾讯云短信应用的 app_key
TENCENT_SMS_APP_KEY = "fc67accd7e4a6bcfd7afe34833ef1d76"

# 腾讯云短信签名内容
TENCENT_SMS_SIGN = "TM雲"

TENCENT_SMS_TEMPLATE = {
    'register': 549365,
    'login': 549365
}
# 腾讯cos的id和key
# 1301491552
TENCENT_COS_ID = 'AKIDyf8Llx9Yy97qJXuFjyylLhphJgnftmxt'  # 替换为用户的 secretId
TENCENT_COS_KEY = 'rTq1yjFhusb6MNAiz0mKceR0KNBk26uT'  # 替换为用户的 secretKey

CACHES = {
    "default": {
        "BACKEND": "django_redis.cache.RedisCache",
        "LOCATION": "redis://127.0.0.1:6379", # 安装redis的主机的 IP 和 端口
        "OPTIONS": {
            "CLIENT_CLASS": "django_redis.client.DefaultClient",
            "CONNECTION_POOL_KWARGS": {
                "max_connections": 1000,
                "encoding": 'utf-8'
            },
            "PASSWORD": "haoyunkai" # redis密码
        }
    }
}

ALI_GATEWAY = "https://openapi.alipaydev.com/geteway.do"
ALI_PRI_KEY_PATH = os.path.join(BASE_DIR,'files/应用私钥2048.txt')
ALI_PUB_KEY_PATH = os.path.join(BASE_DIR,'files/支付宝公钥')
ALI_NOTIFY_URL = "https://127.0.0.1:8000/pay/notify"
ALI_RETURN_URL = "https://127.0.0.1:8000/pay/return"
ALI_APPID = '2016102400751936'